package com.xch.queue;

import com.xch.array.Array;

public class ArrayQueue<E> implements Queue<E> {

    private Array<E> array;

    public ArrayQueue(){
        array = new Array();
    }

    public ArrayQueue(int capacity){
        array = new Array(capacity);
    }

    public void enqueue(E e){
        array.addLast(e);
    }

    public E dequeue(){
        return array.removeFirst();
    }

    public E getFront(){
        return array.getFirst();
    }

    public int getSize(){
        return array.getSize();
    }

    public boolean isEmpty(){
        return array.isEmpty();
    }

}
